home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / EDITORS / PSEDIT.ZIP;1 / PSEDIT.DOC < prev    next >
Encoding:
Text File  |  1994-06-20  |  43.9 KB  |  956 lines

  1.                                     PSEDIT
  2.                               Binary File Editor
  3.                                  USER'S GUIDE
  4.  
  5.                   Copyright 1990, 1993 by Gary C. Crider and
  6.                                Parity Solutions
  7.                                
  8.  
  9.  
  10. TABLE OF CONTENTS:
  11.  
  12.         What is PSEDIT? .................................. 1.0
  13.         Customizing PSEDIT ............................... 2.0
  14.           The PSEDIT.INI Configuration File .............. 2.1
  15.           The PSEDIT Command Line and Switches ........... 2.2
  16.           Customizing On A Network ....................... 2.3
  17.         Operational Notes and Requirements................ 3.0
  18.         The Keyboard and Display ......................... 4.0
  19.         Modifying Data ................................... 5.0
  20.           Filling a block of data ........................ 5.1
  21.         Deleting Data .................................... 6.0  
  22.         Inserting Data ................................... 7.0  
  23.         Using the clipboard (Cut, Paste, Copy) ........... 8.0
  24.         Locating Data .................................... 9.0
  25.           Go to a Position in the File ................... 9.1
  26.           Search for Data ................................ 9.2
  27.           Find and Replace Data .......................... 9.3
  28.         Print the File ................................... 10.0
  29.         Save the File .................................... 11.0
  30.         Hex/Decimal Conversions and Calculations.......... 12.0
  31.         Exiting PSEDIT ................................... 13.0
  32.         Help ............................................. 14.0
  33.         A Useful Example - 
  34.           Modification of DOS 5's EDIT ................... 15.0
  35.         Installation ..................................... Appendix A
  36.         Disclaimer ....................................... Appendix B
  37.         Support .......................................... Appendix C
  38.         Registration ..................................... Appendix D
  39.  
  40.  
  41.  
  42. 1.0 What Is PSEDIT?
  43.  
  44.    One thing most of us learned early while working on our first PC
  45. was that EDLIN, while useful, stank (stunk?)... was malodorous as an editor 
  46. of text files.  Soon there were hundreds of full screen text editors 
  47. available everywhere.  Even Microsoft finally came around and included EDIT 
  48. in DOS 5 to get us away from EDLIN.
  49.  
  50.    An early lesson that most who aspire to be power users learn is that not
  51. all changes we desire to make are in text files.  Sooner or later we end
  52. up patching an executable program, database, or strange format file that
  53. text editors will not handle.  Enter DEBUG.  Just as EDLIN was a pain for
  54. editing text files, DEBUG is a pain for editing binary files.  Strangely,
  55. few people have jumped out with binary editors and some of the few I have 
  56. seen are not much better than DEBUG.  
  57.  
  58.    PSEDIT is a very easy-to-use full screen editor for binary (or text) 
  59. files.  You simply type over the hex or ASCII data much as you would with
  60. any text editor.  PSEDIT ensures that you enter hex characters (0-9 and A-F)
  61. while you are in hex entry mode.  You will be able to see the hex and ASCII
  62. representations at all times whether you are editing in hex or ASCII.  
  63.  
  64.    Using PSEDIT is so intuitive, I don't know why I'm writing this documen-
  65. tation or why you are reading it.  Perhaps we both like to move cautiously.
  66.  
  67.    You see a full screen of data at all times, not just a few bytes.  Paging
  68. through the file is as easy as hitting PgUp and PgDn, you don't have to
  69. enter hex displacements to get to the next page.
  70.  
  71.    I think you'll find, as we have at a Fortune 100 company (my day job),
  72. that PSEDIT becomes one of the handiest tools you have.  You will use it
  73. much more than you now expect that you will.
  74.  
  75.    PSEDIT automatically detects and uses any available conventional, expanded
  76. or extended memory.  It will also use disk space to simulate memory when it
  77. runs short.  This shared memory pool is referred to as virtual memory.  It 
  78. allows very large files to be edited (up to 64 megabytes).
  79.  
  80.    PSEDIT was formerly distributed under the name BEDIT.
  81.  
  82.  
  83. 2.0 Customizing PSEDIT
  84.  
  85.    There are two ways to customize PSEDIT to fit your preferences and your
  86. environment.  The first and most recommended is to make your settings in
  87. the PSEDIT.INI file.  These become your default settings.  Sometimes you
  88. may want to override one or more of them temporarily.  The command line 
  89. switches will override the PSEDIT.INI file.  More options are configurable 
  90. in the PSEDIT.INI file than with command line switches.
  91.  
  92.  
  93.  
  94. 2.1 The PSEDIT.INI Configuration File
  95.  
  96.    A sample PSEDIT.INI file comes with PSEDIT and is initialized to all of
  97. the defaults.  The defaults are used when the PSEDIT.INI file cannot be found
  98. or when a particular setting is missing from the file.  
  99.  
  100.    The PSEDIT.INI file can be changed with any text file editor and should be
  101. saved in a directory that is specified in DOS's PATH= environment variable.
  102. You can use a SET statement such as follows to tell PSEDIT where to look for 
  103. the PSEDIT.INI file:
  104.  
  105.    SET PSEINI=D:\PSEDIT\
  106.  
  107.    Do not specify a file name, only the directory where PSEDIT.INI is
  108. located.  The trailing backslash is only required if you want to specify
  109. a root directory.  Place the SET statement in your AUTOEXEC.BAT file.
  110.  
  111.    If the PSEDIT.INI file is in a directory on your path, you do not need to
  112. use the PSEINI= environment variable.
  113.  
  114.    All of the settings and values for the PSEDIT.INI file are documented
  115. within the PSEDIT.INI file.  If you wish to add comments to the file,
  116. the first non-blank character on the line should be a semi-colon (;).
  117.  
  118.  
  119.  
  120. 2.2 The PSEDIT Command Line and Switches
  121.  
  122.  
  123.    Format: PSEDIT [[path]filename] [/B] [/I] [/V /?] 
  124.  
  125.    The filename is the file name of the file that you want to edit.  The path
  126. is required if a file is specified and is not in the current directory.  See 
  127. BackupMode= in the PSEDIT.INI file for information about automatic or 
  128. prompted backups of the file.
  129.  
  130.    If no file name is specified, a pick list is displayed of all of the 
  131. files in the current directory.  To select a file, use the arrow keys to
  132. move the selection bar to the file you want, and press enter.  If a file is
  133. specified, but not found, a pick list will be displayed of all files in
  134. the specified directory.
  135.    
  136.    /? Display command line help prompt.
  137.    
  138.    /B reverses the effect of the MonochromeVideo setting in PSEDIT.INI.
  139.       If you have specified monochrome display, /B forces color display.  
  140.       If you have not selected monochrome, black and white (monochrome) 
  141.       display is forced.
  142.  
  143.    /I reverses the effect of the InternationalChars setting in PSEDIT.INI.
  144.       if you have specified international characters, /I will cause 
  145.       international characters to not be recognized.  If you have not 
  146.       specified international characters, /I forces recognition of
  147.       international characters.
  148.  
  149.    /G reverses the effect of the GraphicsChars setting in PSEDIT.INI.  If you 
  150.       have specified graphics characters, /G will cause international and 
  151.       graphics charcters to not be recognized.  If you have not specified 
  152.       graphics characters, /G forces recognition of international and graphics 
  153.       characters.
  154.  
  155.    /V reverses the effect of the BIOSWrites setting in PSEDIT.INI. If you have 
  156.       specified BIOS writes, /V will force direct video memory reads and writes 
  157.       for the edit window.  If you have not specified BIOS writes, /V will 
  158.       force BIOS reads and writes.
  159.  
  160.  
  161.    Brackets ([]) indicate optional parameters.  Do not include the brackets
  162. in the command line.
  163.  
  164.  
  165. 2.3 Customizing On A Network
  166.  
  167.    In a LAN environment, PSEDIT would normally be installed on a file server
  168. in a directory that is on the search path.  A master copy of the PSEDIT.INI 
  169. file should also be in this directory and will have the default config-
  170. uration for all users.  
  171.    
  172.    In order for an individual user to customize PSEDIT without impacting 
  173. others, use the PSEINI= environment variable to point to a local or private 
  174. directory that will contain the PSEDIT.INI file to be used.  The PSEINI=
  175. variable does not have to be specified if the personal PSEDIT.INI file is
  176. placed in a directory that precedes the directory with the master INI file
  177. in the search path.  
  178.    
  179.  
  180.  
  181. 3.0 Operational Notes and Requirements
  182.  
  183.    PSEDIT's only firm requirement is that it be run on an Intel-compatible
  184. system that is 286-equivalent or newer (386, 486, Pentium...).  The 8086/
  185. 8088 CPUs are no longer supported.
  186.    
  187.    See section 2.4, The PSEDIT Command Line and Switches, for instruction
  188. on how to start PSEDIT.
  189.  
  190.    Please look at the BackupMode= parameter of the PSEDIT.INI file to decide
  191. how you would like PSEDIT to handle backing up your file.  You can specify
  192. that backups are never taken, that you are prompted to create a backup, or
  193. that backups are automatically made whenever a file is loaded.  While never
  194. taking backups is very dangerous, always making backups is slower and can
  195. clutter up your disk with a bunch of backup files when all you wanted to do 
  196. was view or print a file.  The prompted mode is the default and most flexible.
  197. It only requires one extra keystroke each time a file is loaded.  You may
  198. also specify what directory is to contain you backups.  This can keep down
  199. the clutter somewhat.  All backup files are named the same as the loaded file
  200. except with a .BAK extension.
  201.  
  202.  
  203.    If you intend to modify a file with PSEDIT, I highly recommend making
  204. a backup file for obvious reasons.  Since PSEDIT will allow you to change 
  205. any file in any way, it is obviously a very dangerous weapon in the hands of 
  206. the unskilled or careless as well as a very powerful tool in the hands of the 
  207. skilled and careful.  Please be careful!
  208.  
  209.    PSEDIT reads the entire file into virtual memory before any edits are 
  210. performed.  All changes are made only to the copy in memory until a SAVE is 
  211. done. PSEDIT uses VMM, a virtual memory manager by Parity Solutions.  VMM 
  212. lets you utilize as much conventional, expanded and extended memory as you 
  213. have, then overflows onto disk to simulate the remaining required memory.  
  214. Assuming you have enough memory and disk space, you can edit files up to 64 
  215. megabytes in size.
  216.  
  217.    PSEDIT must have at least one byte in its data buffer to function,
  218. therefore, if you load a file with a length of 0, or delete all bytes in a
  219. file, one byte will show up on the screen and its value will be x00.
  220.  
  221.    PSEDIT has three different display modes and three different ways of 
  222. selecting the one you prefer.  The normal default mode is to display U.S. 
  223. English characters and punctuation.  The second adds international characters 
  224. and the third adds graphics characters.  If you wish to change the default, 
  225. use the PSEDIT.INI file. If you want to change the initial mode for a single 
  226. execution of PSEDIT, use the command line switches /I or /G as described 
  227. under "Customizing PSEDIT."  If you want to change the characters displayed 
  228. after you have already loaded PSEDIT, use the ALT-I and ALT-G toggles as 
  229. described below under "The Keyboard and Display."
  230.  
  231.   The reason the U.S. English letters and punctuation were selected as the 
  232. default is first because most of the PSEDIT users are in the U.S., and
  233. second, because when most users refer to the ASCII portion, they are looking 
  234. for a particular text string or phrase.  Not displaying the graphics and
  235. international characters makes the phrase or word easier to spot.  If you
  236. know exactly what you are looking for, use the search feature to locate it
  237. quickly.  International users should not feel slighted, because you can 
  238. easily change the default to display international characters.  Unfortunately,
  239. you must display all international characters, not just the ones used in
  240. your language.
  241.  
  242.  
  243.  
  244. 4.0 The Keyboard and Display
  245.  
  246.    The top line of the display shows the name, size, date and time of the
  247. file being edited.  It also shows whether case-sensitivity is set on or off.  
  248. There is also an area that will toggle between "HEX" and "ASCII" depending on 
  249. which edit mode you are in.  The upper-right corner contains two numbers in
  250. the format ddddddd:xhhhhhh.  This is the current cursor location in both
  251. decimal (ddddddd) and hex (hhhhhh).  The bottom line contains a quick 
  252. reference of function keys and their usage.  Other key functions can be 
  253. displayed by pressing F1 (Help).
  254.  
  255.    Down the left side of the display is the offset from the start of the   
  256. file to the first byte displayed on that line.  The offset is in hex.   
  257.  
  258.   HINT: The easy way to see where your cursor is currently located is to
  259. press ALT-D or ALT-H, rather than adding the horizontal offset to the offset on the
  260. left of the screen.  The hex/decimal conversion windows will pop up with 
  261. the current cursor location displayed in the operand field.  ALT-D displays
  262. the offset in Decimal, ALT-H displays it in hex.
  263.  
  264.    There are two modes of editing in PSEDIT.  When you first load a file, the
  265. screen appears with both hex data and its ASCII representation displayed in 
  266. separate sections of the screen.  The cursor is initially placed in the hex 
  267. portion of the screen for editing in hex.  The character (represented by two 
  268. hex digits) at the cursor location appears red on color monitors.  The same 
  269. character on the ASCII (right) side will be light cyan.  All other data 
  270. characters are yellow.  As the cursor moves, you will see the light cyan 
  271. highlighting on the ASCII display move with the cursor and red letters of the 
  272. hex display.  Pressing TAB places the cursor in the ASCII portion and the 
  273. display at the cursor becomes red.  The corresponding position in the hex 
  274. data becomes light cyan.  TAB toggles the cursor back and forth between the 
  275. two editing areas.
  276.  
  277.    The ASCII display does not display every displayable character, but only
  278. letters and numbers and the more common punctuation symbols that are common
  279. to most printers.  All other characters appear as periods.  You can only 
  280. enter these characters on the ASCII side.  To enter exotic characters you 
  281. must use the hex representation on the hex side.  If a blank appears on the
  282. ASCII display, it is  because there is a true blank (hex 20) at that position.
  283.  
  284.    The following keys function as shown during editing:
  285.  
  286.    Page Down    - Display the next page of data.
  287.    Page Up      - Display the previous page of data.
  288.    Home         - Position the cursor at the start of the file.
  289.    End          - Position the cursor at the end of the file.
  290.    Down Arrow   - Move the cursor down one line.
  291.    Up Arrow     - Move the cursor up one line.
  292.    Right Arrow  - Move the cursor right one byte.  If at the end of a line, 
  293.                   move to the first byte of next line.
  294.    Left Arrow   - Move the cursor left one byte.  If at the start of a line,
  295.                   move to the last byte of the previous line.
  296.    Enter        - Same as right arrow.
  297.    Tab          - Swap the edit cursor between hex and ASCII modes.
  298.    Back Tab     - Clears the byte.  You must then type something in the byte
  299.                   before the cursor can be moved.
  300.    Insert       - Insert one byte.  Everything beyond this byte is shifted one 
  301.                   position and a hex 00 byte is inserted at the cursor.
  302.    Delete       - Delete one byte at the cursor.
  303.  
  304.    Function keys:
  305.  
  306.    F1     - Display the help screen.
  307.    F2     - Save any changes to the file on disk.
  308.    F3     - Insert a specified number of bytes at cursor.
  309.    F4     - Delete a specified number of bytes at cursor.
  310.    F5     - Move the cursor to a specified address within the file.
  311.    F6     - Print the file to LPT1:.  It appears in basically the same format
  312.             as displayed.
  313.    F7     - Toggle case-sensitivity for ASCII string searches.
  314.    F8     - Specify a search argument and locate the first occurrence of it in
  315.             the file.
  316.    F9     - Locate the next occurrence of the search argument.
  317.    F10    - Display status of clipboard, blocked data and the virtual
  318.             memory manager.
  319.    
  320.    
  321.    Alt keys:
  322.  
  323.    ALT-C  - Hex/decimal calculator 
  324.    ALT-D  - Decimal to hex conversion
  325.    ALT-H  - Hex to Decimal conversion
  326.    ALT-X  - Exit PSEDIT.
  327.    ALT-V  - Toggle between 25-line and 43/50 line display modes.
  328.    ALT-F6 - Print an address range.
  329.    ALT-I  - Toggle displaying of international characters.
  330.    ALT-G  - Toggle displaying of international and graphics characters.
  331.    
  332.    Block keys:
  333.  
  334.    CTL-K B - Mark the start of a block to be deleted.
  335.    CTL-K K - Mark the end of a block to be deleted.
  336.    CTL-K H - Unmark a currently marked block.
  337.    CTL-K F - Fill a block with a given value.
  338.  
  339.    Clipboard function keys:
  340.  
  341.    CTL-INS  - Copy blocked data to clipboard.
  342.    CTL-DEL  - Cut blocked data from the file and into the clipboard.
  343.    SHFT-INS - Paste clipboard contents at current cursor location.  The
  344.               contents are inserted.  Existing data is not overlaid.
  345.  
  346.    ESCAPE - Exit PSEDIT.
  347.  
  348.  
  349. 5.0 Modifying Data
  350.  
  351.    Modifying data is very simple, just type over it.  Use the TAB key to 
  352. select the hex or ASCII area.  A MODE indicator on the top line will change 
  353. to indicate whether you are in hex or ASCII edit mode.  When typing in the 
  354. hex area, only valid hex characters, 0-9 and A-F are allowed and upper case 
  355. is forced.  When entering data in the ASCII portion, only common printable 
  356. characters are allowed and upper or lower case may be used.
  357.  
  358.  
  359.  
  360. 5.1 Filling a block of data   
  361.  
  362.    You may mark a block of data (see Deleting Data below) and then press
  363. CTL-K F.  You will be prompted for a fill value (in HEX or ASCII depending 
  364. on your edit mode) to overlay the contents of the blocked data. You may press 
  365. ESCAPE at the prompt to abort the fill operation.  Once you enter the value 
  366. and press enter, the blocked area is filled with the value you specified.
  367.  
  368.  
  369.  
  370. 6.0 Deleting Data
  371.  
  372.    First place the cursor on the first byte of the data that you want to 
  373. delete.  Pressing the DELETE key deletes one byte of data at this position.
  374. Press DELETE repeatedly to delete several bytes.  If a large block needs to
  375. be deleted, press the F4 key and reply to the prompt with the number of bytes 
  376. (up to the clipboard size as specified in PSEDIT.INI) you want to delete 
  377. starting with the byte at the cursor.
  378.  
  379.    There is also a facility to mark a block and then delete it.  Press 
  380. CTL-K B to mark the first byte of a block, then press CTL-K K to mark the
  381. last byte of a block.  Then press DELETE or F4 to delete the block.  You
  382. can unmark a block by pressing CTL-K H.  You can also change the start or 
  383. end of the block at any time before the block is deleted or unmarked.  These 
  384. keys conform to WordStar-type conventions used in many text editors and word 
  385. processors today.  You can mark and delete blocks up to the size of the
  386. clipboard as specified in PSEDIT.INI.
  387.  
  388.    PSEDIT cannot handle a file with no data.  If you delete all bytes in the
  389. file, PSEDIT will display a file with one byte of x00.
  390.  
  391.  
  392.  
  393. 7.0 Inserting Data
  394.  
  395.    PSEDIT, rather than using an insert mode, lets you insert bytes of binary 
  396. zeros, hex 00, into the file.  You can then type over the inserted bytes with 
  397. the data that you require, or you can use the fill function to fill the area
  398. with another value.
  399.  
  400.    Inserting data causes the file to grow.  To allow for this growth, an
  401. additional 64k of virtual memory was acquired.  Thus, if you insert more than
  402. 64 kilobytes, you must save the file and reload it to acquire another 64k
  403. expansion area.  The size of the expansion area can be increased as high
  404. as 256k in the PSEDIT.INI file.
  405.  
  406.    Place the cursor at the byte where you want the data inserted.  The data
  407. is inserted BEFORE the byte at the cursor.  Pressing the INSERT key inserts 
  408. one byte at a time.  If a large block needs to be inserted, press F3 and 
  409. specify the number of bytes you want inserted up to the size of the clipboard
  410. as specified in PSEDIT.INI.  Once the null bytes appear, type over them if 
  411. necessary.
  412.  
  413.    In order to add bytes to the end of the file, press END to go to the last
  414. byte of the file then press the right arrow.  Each press of the right arrow
  415. adds a byte to the file.  To enter a large block at the end of the file,
  416. press the right arrow once, then press F3 and specify the number of bytes
  417. needed less one (since you already added one when you pressed the right
  418. arrow).
  419.  
  420.    You can insert data from the clipboard by placing the cursor where you
  421. want the inserted data to begin and pressing SHIFT-INSERT.  If the clipboard
  422. is empty, nothing will happen.  Otherwise, the new data will appear inserted
  423. at the cursor location and marked as a block.  This is so that if you made a
  424. mistake and placed it improperly, you can just press DELETE to delete it,
  425. reposition your cursor and hit SHIFT-INSERT again to reinsert it.  Press
  426. CTL-K H to unmark the block.  The data remains in the clipboard, so it can 
  427. be inserted at multiple locations.
  428.  
  429.  
  430.  
  431. 8.0 Using the Clipboard (Cut, Paste, Copy)
  432.  
  433.    PSEDIT contains a clipboard for use in cutting, pasting and copying
  434. marked blocks. It's size may range from 0 to 48k and is specified in 
  435. PSEDIT.INI.  The clipboard uses CUA keyboard conventions.
  436.  
  437.    First, mark a block of data (see Deleting Data for instructions on
  438. marking blocks), then press CTRL-INSERT to copy the block to the clipboard.
  439. Press SHIFT-DELETE if you want to copy the block to the clipboard and 
  440. delete it from its current position in the file (Cut).
  441.  
  442.    Once you have cut or copied data into the clipboard, you may paste 
  443. (insert) it anywhere in the file by using SHIFT-INSERT.  See Inserting Data
  444. for details on using the paste feature.
  445.  
  446.    If you try to cut or copy a block that is greater than the clipboard size,
  447. a message window will pop up and the current block marks must be adjusted
  448. to select a smaller block.
  449.  
  450.  
  451.  
  452. 9.0 Locating Data
  453.  
  454.    There are basically three ways to move the cursor to an area you want
  455. to edit.
  456.  
  457.    First you can use Page Down and Page Up to visually look for that area you
  458. want.  Primitive, but effective.
  459.  
  460.    Second, if you know the offset into the program of the area you want to 
  461. modify, press F5 and type the offset in hex.  
  462.  
  463.    The third method is to let the computer search for a known byte config-
  464. uration.
  465.  
  466.  
  467.  
  468. 9.1 Go to a Position in the File
  469.  
  470.    An offset or displacement is measured from the start of the file.  The
  471. first byte is offset 0, the second is 1, etc.  When you press F5, you are
  472. prompted for an offset which you provide in hex.  The cursor is then placed 
  473. at that address and display is updated to show the data at the cursor.
  474.  
  475.    This method is often used in applying documented patches supplied by a 
  476. software vendor.
  477.  
  478.  
  479.  
  480. 9.2 Search for Data
  481.  
  482.    Pressing F8 pops up a dialogue box that requests entry of a search argument.
  483. After supplying this argument, the cursor is positioned to the first 
  484. occurrence of that value in the file.  If it is not found, the cursor will 
  485. appear on the last byte of the file.  If a first occurrence is found, pressing
  486. F9 searches for the next occurrence.  If a second is found, pressing F9 again
  487. searches for the third occurrence, and so on.
  488.  
  489.    If the cursor is in the hex editing area, you will be prompted for up to
  490. 30 hex bytes of search argument (60 hex digits).  When the cursor is in
  491. the ASCII editing area, you may enter up to 60 ASCII characters for a search
  492. argument.  Admittedly the search arguments are small, but I have found that
  493. when editing binary files, you are generally not looking for long strings.
  494.  
  495.    Hex data is normally entered in sets of two hex digits (nibbles) since it
  496. takes two hex digits to represent one byte.  If you enter an odd number of hex 
  497. digits, a zero nibble is prepended to the argument.  For example, if you
  498. enter 18A, the resulting two bytes that are located are 01 8A.  
  499.  
  500.   No byte swapping is ever done to accommodate the PC's low-high storage 
  501. scheme of integer data.  So if you are looking for an integer value of 
  502. 1000 (decimal), hex 3E8, which is stored as hex E8 03, the search argument 
  503. you would provide is E803.  If you don't have a clue what this means, you 
  504. probably don't need to be concerned about using PSEDIT in this manner.
  505.  
  506.   The F7 key is used to enable or disable case-sensitive searches when in
  507. ASCII character mode.  The current state is shown on the top line of the 
  508. display.  If ON, upper/lower case letters must match exactly.  If OFF,
  509. upper and lower case letters are equivalent.  The CASE mode has no effect
  510. on hex mode searches.
  511.  
  512.   When searching in ASCII mode, and you want any number of trailing blanks 
  513. in the search string, you must terminate the string with a double quote (").
  514. If you want the last character to actually be a double quote, you must
  515. terminate the string with two double quotes ("").  Example:
  516.  
  517.   ABC""  = [ABC"]
  518.   ABC  " = [ABC  ]
  519.   ABC    = [ABC]
  520.  
  521.   In hex mode you specify trailing blanks with the hex characters 20.
  522.  
  523.  
  524.  
  525. 9.3 Find and Replace Data
  526.  
  527.    ALT-F8 invokes the search/replace procedure.
  528.  
  529.    The search/replace procedure works much like the search procedure des-
  530. cribed above.  Please read that section.  In addition, you will be prompted
  531. to input a replace string.  The rules for trailing blanks and quotes described
  532. above also apply to the replace string.
  533.  
  534.    When you proceed, each occurance of the search string is located and you
  535. are prompted to see if you want to replace the instance of the search string
  536. at the current cursor location with the replace string you specified.  If you
  537. reply Y, the contents are replaced and the next search string is sought,
  538. repeating this procedure until all instances of the search string have been
  539. found.  You do not have to press F9.  If you reply N to a replace prompt,
  540. the file is not modified and the next instance of the search string is 
  541. sought.  If you press ESC while the replace prompt is displayed, the search/
  542. replace process is terminated.
  543.  
  544.   The initial window that prompts for the search and replace strings also
  545. contains a filed labeled "Prompt?".  If you place a Y here, processing is as
  546. decribed above.  If you place an N here, you are never prompted when an
  547. instance of the search string is located, and it is automatically replaced 
  548. with the replace string.  Every instance in the file is replaced.  You will
  549. see the search strings as they are located, but they will pass quickly.
  550.  
  551.  
  552. 10.0 Print the File
  553.  
  554.    Printing the file is easy.  You just press F6 and a window will pop up
  555. that tells you how many pages will be printed.  You may abort at this time
  556. by pressing ESCAPE or replying N to the "Continue? (Y/N)" prompt.  As pages
  557. are sent to the printer, the page number will be displayed.  You may press
  558. any key to cancel printing at the end of the current page.
  559.  
  560.    The output is sent to standard print (PRN).  The format is side-by-side 
  561. hex/ASCII like that displayed on the screen with offset addresses (dis-
  562. placements) at the start of each line.  880 (hex 370) bytes are printed on 
  563. each page.  The pages are numbered and the file name, size, date and time 
  564. appear at the beginning of each page.
  565.  
  566.    ALT-F6 allows you to supply a starting and ending address range to print.  
  567. The actual pages printed will probably not start and end with the addresses 
  568. you provided.  Rather the pages (as if you had printed the entire file) that 
  569. contain your starting address through your ending address will be the only
  570. pages printed.
  571.  
  572.    
  573.  
  574. 11.0 Saving the File
  575.  
  576.    Prior to pressing F2 to save the file, all modifications are only done in 
  577. virtual memory.  F2 writes the file image in memory over the file that was 
  578. originally loaded, and the changes become permanent.
  579.  
  580.    You may, however, change the file name at save time.  A dialogue box will
  581. appear with the current file name.  Accept it as is by pressing ENTER or
  582. modify it first.
  583.  
  584.    If the saved file name already exists you will be asked for verification
  585. before overwriting.
  586.  
  587.  
  588.  
  589. 12.0 Hex/Decimal Conversions and Calculations
  590.  
  591.    Pressing ALT-D (Decimal-to-hex) pops up a window into which up to eight-
  592. digit decimal numbers can be entered.  Pressing ENTER displays the results 
  593. of converting this number to hexadecimal.  Pressing ESC exits the window.
  594. Initially, the current cursor position is displayed in the operand field.
  595.  
  596.    Pressing ALT-H (Hex-to-Decimal) pops up a window into which up to eight-
  597. digit hexadecimal numbers can be entered.  Pressing ENTER displays the 
  598. results of converting this number to decimal.  Pressing ESC exits the window.
  599. Initially, the current cursor position is displayed in the operand field.
  600.  
  601.    ALT-C pops up a hex/decimal calculator which will add, subtract, multiply 
  602. or divide two hex, decimal or mixed values.  The result is displayed in both\
  603. hex and decimal.  When entering the values to be calculated, precede hex 
  604. values with an X (i.e. X31A0) and preceed decimal values with a D (i.e. 
  605. D4095).  Enter a plus (+) or minus (-) sign in the operator field.  Press 
  606. CTRL-ENTER when ready to calculate (or ENTER at the operator field).
  607.  
  608.    Since it is designed primarily to help you figure displacements within a
  609. program, the calculator operates on unsigned long (4-byte) integer values.
  610. Thus decimal points and negative numbers are not allowed.  If you subtract a 
  611. number from a smaller number, the result will be the 32-bit two's compliment
  612. of the negative result, usually a very high number.  For instance, if you 
  613. subtract 1 from 0, the result will be 4,294,967,295, the maximum for an
  614. unsigned long integer.  If you compute a number with results higher than
  615. the above number, the results will be inaccurate.  Let's hope you are not
  616. trying to edit any 4 Gb files!
  617.  
  618.   When you first invoke the calculator, the hex displacement of the current
  619. cursor location will be in the first operand.  This facilitates calculating
  620. displacements forward or backward from the cursor.  You can change the value
  621. to anything you like.
  622.  
  623.   HINT: The easy way to see where your cursor is currently located is to
  624. press ALT-D or ALT-H, rather than adding the horizontal offset to the offset 
  625. on the left of the screen.  The hex/decimal conversion windows will pop up 
  626. with the current cursor location displayed in the operand field.  ALT-D 
  627. displays the offset in Decimal, ALT-H displays it in hex.
  628.  
  629.  
  630.  
  631. 13.0 Exiting PSEDIT
  632.  
  633.    To quit PSEDIT, press ESC or ALT-X from the main edit screen.  If your 
  634. file has been modified since the last save, you will see a prompt: "Save 
  635. file? (Y/N)".  Pressing ESC again will return you to the point you were when 
  636. you pressed ESC.  A Y response invokes the save procedure then returns you to 
  637. DOS or to the file name pick list if the editor was entered via the pick list. 
  638. An N response bypasses the save procedure.  To exit from the pick list screen 
  639. to DOS, press ESC.  Once you exit to DOS or the pick list, any unsaved 
  640. modifications in the editor are lost.
  641.  
  642.  
  643.  
  644. 14.0 Help
  645.  
  646.    Pressing F1 pops up a help screen describing the editing and function keys.
  647. Pressing ESCAPE (or any key when last page is displayed) removes the help
  648. window and returns you to the editor.  Page Down and Page Up can be used to 
  649. move between help pages.
  650.  
  651.  
  652.  
  653. 15.0 A Useful Example - Modification of DOS 5's EDIT
  654.  
  655.    I prefer DOS 5's EDIT command by leaps and bounds over the EDLIN of
  656. previous DOSes, but there is one thing I especially don't like about it.
  657. When you select File/Open, it comes up with a default file list specification
  658. of *.TXT, like that is the only extension ever used for ASCII text files.  I
  659. would prefer *.* and let me choose from all of my files.  After reviewing
  660. all of the options, it appeared to me that there was no way to set this
  661. value to *.*.
  662.  
  663.    My next thought is that since there doesn't appear to be any type of
  664. configuration file for EDIT, the *.TXT string must be in the program, so
  665. I'll just pull out my trusty PSEDIT and zap it to *.*.  Let's do it.
  666.  
  667.    Go to your directory where you keep DOS (usually C:\DOS).  Type PSEDIT
  668. EDIT.COM.  Since we know we are looking for an ASCII string of *.TXT, press
  669. TAB to swap the cursor to the ASCII area and press F8 to search.  Enter
  670. *.TXT and press ENTER.  You now find that your cursor is positioned on the 
  671. last byte of the file.  This means it didn't find the string we were
  672. looking for.  Strange.
  673.  
  674.    But look! Right above our cursor are some messages that EDIT.COM displays.
  675. One of them reads, "Can not find file QBASIC.EXE."  Oh yeah, I read somewhere
  676. that the EDIT editor with DOS 5 was a version of the QBASIC editor.  Let's
  677. press ESCAPE, answer 'Y' and get back to the DOS prompt.  Now let's enter
  678. PSEDIT QBASIC.EXE.
  679.  
  680.    Again let's go the ASCII area with TAB and search for *.TXT with F8.  
  681. Bingo! We found it.  
  682.    
  683.    In my copy of DOS 5.0's QBASIC.EXE, I am now at a displacement of hex 
  684. 3BCCA into the program and the cursor is positioned on the * of string *.TXT.  
  685. Hit the right arrow twice to position the cursor on the first T.  Type an 
  686. asterisk (*).  The string now shows *.*XT and the cursor is on the X.
  687. Lets change the X and T to hex 00s, which in most languages is used to 
  688. terminate a string.  Since we can't enter a binary zero field in the ASCII
  689. area, press TAB to switch the cursor back to the hex area.  Now type
  690. four 0s.  As you can see you have now changed the XT characters from
  691. hex 54 58 (the hex representation of X and T) to hex 00 00.
  692.  
  693.    This is what we wanted to do, so now let's save the file by pressing
  694. F2.  Since the file was not backed up beforehand, type in a new file name
  695. (QBASIC.1) just to make sure it works before we destroy the original. Exit 
  696. to DOS by pressing ESCAPE and Y.  Rename the original to QBASIC.BAK and 
  697. QBASIC.1 to QBASIC.EXE.  Now type EDIT and go to the File/Open screen.  Lo 
  698. and behold!  It now reads *.* and all of the files in the current directory 
  699. are displayed in the pick list.
  700.  
  701.    You can go delete QBASIC.BAK now.
  702.  
  703.  
  704.  
  705. APPENDIX A
  706.  
  707. Installation
  708.  
  709.     PSEDIT is distributed in a self-extracting ZIP file called PSEDT.EXE.  It 
  710. contains the following files:
  711.  
  712.         PSEDIT.EXE         The executable file for PSEDIT.
  713.         PSEDIT.INI         Configuration file for PSEDIT.
  714.         PSEDIT.DOC         The documentation file.
  715.         PSEDIT.HST         Modification descriptions for previous versions
  716.                            of PSEDIT. 
  717.         PSEDIT.Vnn         Modification descriptions for current version nn.
  718.         PRODUCTS.DOC       A description of other Parity Solutions products
  719.                            available on CompuServe and ZiffNet.
  720.  
  721.     For best results, extract the file into a directory on your PATH.  If you
  722. don't use a directory in your path, you will have to designate the directory
  723. containing PSEDIT.EXE when executing the program.
  724.  
  725.     If you have a utility directory that is on your PATH, this is an excellent
  726. location for PSEDIT.  An example installation would be:
  727.  
  728.     C:
  729.     CD \UTIL
  730.     copy [path]PSEDT.EXE
  731.     PSEDT
  732.     DEL PSEDT.EXE
  733.  
  734.     If they are not currently in your path, simply copy all of the files to a
  735. directory in your path.  Keep the PSEDT.EXE file anywhere you like, but give 
  736. plenty of copies, as is, to your friends.  If you register PSEDIT, you are not 
  737. licensed to give your serial number to anybody without first removing the 
  738. serialization from your copy.
  739.  
  740.  
  741.  
  742.  
  743. APPENDIX B
  744.  
  745.  
  746. Disclaimer
  747.  
  748. BECAUSE OF THE DIVERSE NATURE OF COMPUTER EQUIPMENT AND EXPERTISE OF USERS,
  749. PARITY SOLUTIONS AND GARY C. CRIDER MAKE NO WARRANTY ON THE PSEDIT PROGRAM
  750. WHATSOEVER, EXPRESS OR IMPLIED.  THE USER ASSUMES ALL RISK OF DAMAGE TO DATA 
  751. OR EQUIPMENT RESULTING DIRECTLY OR INDIRECTLY FROM THE USE OR MISUSE OF THIS 
  752. PROGRAM PRODUCT.  THE USER MUST BE AWARE THAT USING PSEDIT TO MAKE ALTERATIONS 
  753. TO PROGRAMS OR DATA CAN RENDER THAT PROGRAM OR DATA USELESS.
  754.  
  755. USERS ARE ADVISED TO TEST MODIFICATIONS MADE WITH PSEDIT THOROUGHLY ON FILES 
  756. FOR WHICH A BACKUP EXITS.  ANY LIABILITY OF THE AUTHOR OR PARITY SOLUTIONS IS 
  757. LIMITED TO REPLACEMENT OR REFUND OF THE REGISTRATION FEE.
  758.  
  759. Any of the above disclaimers may not apply in your state if your state dis-
  760. allows such limits on product liability.
  761.  
  762.  
  763.  
  764. APPENDIX C
  765.  
  766.  
  767. Support
  768.  
  769.     I have tried to test the program to the fullest, but I am limited as to
  770. systems and configurations with which to test.  I have been programming for 18
  771. years and the one thing I know for sure is that bug free programs are very few
  772. and far between.  I can only promise to support the program to the best of my
  773. ability and provide fixes as expeditiously as possible.  PSEDIT has been used
  774. at my home and work site extensively for several years and has proven to be a
  775. reliable tool.
  776.  
  777.     Anyone can report problems and suggest changes.  Registered users get top
  778. priority in resolving their problems.  There are three ways you can report
  779. problems.  The preferred method is to contact me through CIS mail (not forum
  780. messages).  My CIS ID is 71760,3413.  You can also write me at:
  781.  
  782.    Gary C. Crider
  783.    Parity Solutions
  784.    1903 Pavia Court
  785.    Arlington, TX 76006
  786.  
  787.     The last method is to phone (817) 261-9552.  Since I am the sole technical
  788. support and the line is also used for my network consulting business, it is
  789. often hard to get through to me.  Please call and leave a message between 7:30
  790. am and 5:30 pm Central time.
  791.  
  792.     No matter which method you use, please give a brief description of your
  793. problem, the release number of your program, your registration serial number 
  794. if you are registered, and your phone number.  If I need more information, I 
  795. will contact you as soon as I can.  When I have a solution, I will contact 
  796. you however you prefer.
  797.  
  798.     I work full time, have a consulting business to run in my spare time and
  799. write programs instead of sleeping.  So please be a little patient with me.
  800.  
  801.     Program updates are available on CompuServe or can be requested from us
  802. for a $5 shipping and handling charge.  Add $1 for international shipping
  803. outside the U.S., Canada and Mexico.  A distribution disk of all Parity 
  804. Solutions products will be sent to you.  Specify disk size and format.
  805.  
  806.  
  807.  
  808. APPENDIX D
  809.  
  810.  
  811. Registration
  812.  
  813.  
  814.     I begin with an apology.  I hate programs that in any way inhibit func-
  815. tionality or performance for the shareware version.  But when it came down to
  816. feeding the family and paying the bills, I had a change of heart and inserted
  817. a pesky notice that pops up at the beginning and gets on your nerves.  I
  818. chose this approach above that of limited functionality.  The program's full
  819. capabilities are available for you to evaluate before you invest your hard-
  820. earned money.
  821.  
  822.     Registered users will receive a unique serial number and instructions on
  823. how to serialize the program.  Serialization can be re-applied to updated
  824. versions and in no way hinders your use of the program.  You can compress or
  825. decompress the program with no effect.  It is already compressed before 
  826. distribution.
  827.  
  828.     As a registered user, you will be able to update without re-registration
  829. or additional fees.
  830.  
  831.     To register your copy, please send $24 US ($95 per file server on LANs) 
  832. check or money order (sorry, no credit cards yet) to:
  833.  
  834.    Gary C. Crider
  835.    Parity Solutions
  836.    1903 Pavia Court
  837.    Arlington, TX 76006
  838.  
  839.     Purchase orders for amounts of $72 or more are accepted from U.S. or
  840. Canadian companies and institutions.
  841.  
  842.     Add $1 to total order for postage outside the U.S., Canada and Mexico.
  843.     
  844.     Or, you can register single-use licenses online quickly and easily in 
  845. Compuserve.  Simply GO SWREG and register ID #751.  Your registration will be 
  846. added to your Compuserve bill.  International exchange was never easier, and
  847. you save the $1 postage charge.
  848.  
  849.     If you send your CIS ID or register via SWREG, your registration will be 
  850. sent to you via CIS mail, along with instructions on how to serialize your copy 
  851. of PSEDIT.  This usually involves one day or less turnaround.
  852.  
  853.     Program diskettes are not normally shipped.  Normal distribution is via 
  854. CompuServe.  If you need a diskette, please see the instructions under Support 
  855. above.  You will receive a serial number and instructions for serializing your 
  856. copy of the program.
  857.     
  858.     Each license gives you or your company a single use permit for PSEDIT. It 
  859. is not restricted to a single machine as long as no two users can be simul-
  860. taneously using the program.  As Borland says, "treat it like a book."  As an 
  861. example, if you register PSEDIT for your home computer, but during the day you 
  862. use a portable or a computer at work,  you may keep PSEDIT on both machines as 
  863. long as no one is at home using it on your home computer.
  864.  
  865.     LAN licenses grant rights to all users of a file server.  If inter-
  866. networking, a license must exist for each file server that contains a copy
  867. of PSEDIT.EXE.  If two or more file servers exist on a single LAN strictly for
  868. mirroring data and fault-tolerance, these will be counted as a single file
  869. server for licensing purposes.  If in doubt, contact me.  We can work out
  870. an agreement.
  871.  
  872.     Site licensing is also available on a negotiated price basis.  I guarantee
  873. it will be an economical alternative to buying licenses for each user.
  874.  
  875.     You may freely distribute the original PSEDT.EXE file in any way you see
  876. fit other than selling it.  Users' groups and shareware distribution services
  877. may charge a reasonable fee for the medium and duplication costs.  Bulletin 
  878. boards may not charge additional fees for downloading this specific program, 
  879. other than normal connect-time and/or membership charges.
  880.  
  881.     You are NOT licensed to give anyone your serial number unless you first
  882. remove all serialization from your computer.  You may then no longer use that
  883. serial number.  Only Parity Solutions has the authority to issue serial
  884. numbers.
  885.  
  886.     Modification of PSEDIT.EXE in any way is prohibited and unlawful.
  887.     
  888.     Licensees of Parity Solutions' BEDIT program may serialize PSEDIT by
  889. renaming BEDIT.SER to PSEDIT.SER.
  890.  
  891. ==============================================================================
  892.                 
  893.                           ORDER FORM FOR PSEDIT
  894.  
  895. Send checks payable to:
  896.  
  897.   Parity Solutions                
  898.   1903 Pavia Court
  899.   Arlington, TX 76006
  900.  
  901.  
  902.  
  903. BILLING ADDRESS:                        SHIP TO (If different):
  904.  
  905. NAME:    _____________________________  NAME:      ___________________________
  906.       
  907. COMPANY: _____________________________  COMPANY: _____________________________
  908.  
  909. STREET:  _____________________________  STREET:  _____________________________
  910.  
  911.          _____________________________           _____________________________ 
  912.         
  913. CITY/ST: _____________________________  CITY/ST: _____________________________
  914.  
  915. ZIP/POSTAL CODE: _____________________  ZIP/POSTAL CODE: _____________________
  916.  
  917. COUNTRY: _____________________________  COUNTRY: _____________________________
  918.  
  919. PHONE:   _____________________________  PHONE:   _____________________________
  920.  
  921.  
  922. CompuServe ID: _______________________(Optional)
  923.  
  924.  
  925.    NOTE: Parity Solutions sends a serial number for each registration and 
  926.          instructions for serializing your program.  A diskette containing
  927.          the latest releases of all Parity Solutions shareware products is
  928.          available for $5.00 U.S.  The current release of PSEDIT is avail- 
  929.          able for downloading on CompuServe in the IBMSYS forum.
  930.  
  931.  
  932.    QTY   DESCRIPTION                             PRICE EA.   TOTAL PRICE
  933.  
  934.    ___   PSEDIT license and registration           $24.00    ___________
  935.  
  936.    ___   PSEDIT Network license and registration    95.00    ___________
  937.  
  938.    ___   Parity Solutions shareware diskette         5.00    ___________
  939.  
  940.          International postage outside U.S.,         1.00    ___________
  941.          Canada and Mexico.                
  942.  
  943.                              
  944.                                           Total Enclosed:    ___________
  945.  
  946.  
  947. Diskette size (if ordered): __ 5.25" 360k  __ 5.25" 1.2M  __ 3.5" 760k
  948.  
  949.  
  950. Thank you for doing business with Parity Solutions.  (817) 261-9552
  951.  
  952. Parity Solutions is a partnership of Gary C. Crider and Russell L. McCloud.  
  953. Federal tax identification number 75-2468376.
  954. ==============================================================================
  955.  
  956.